package com.university.evaluation.enums;

import lombok.Getter;

@Getter
public enum RespEnum {
    // 定义常用的状态码和消息
    SUCCESS(200, "操作成功"),
    FAILURE(500, "操作失败"),

    // --- 系统级别错误 ---
    UNAUTHORIZED(401, "未授权，请重新登录"),
    FORBIDDEN(403, "无权限访问"),
    NOT_FOUND(404, "请求的资源不存在"),

    // --- 业务级别错误 ---
    USERNAME_OR_PASSWORD_ERROR(1001, "用户名或密码错误"),
    USERNAME_EXIST(1002, "用户名已存在"),
    STUDENT_ID_EXIST(1003, "该学号/工号已被注册"),
    ROLE_MISMATCH(1004, "选择的角色与账号实际角色不符"),
    OLD_PASSWORD_ERROR(1005, "原密码错误");

    // ... 您可以根据业务需求添加更多枚举 ...

    private final Integer code;
    private final String msg;

    RespEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}